package org.leiyang.service.feign;

import org.leiyang.common.dtos.TestRequestVO;
import org.leiyang.common.entities.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import reactivefeign.spring.config.ReactiveFeignClient;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

//@FeignClient(value = "mise-business-2", contextId = "remoteService", path = "test")
@ReactiveFeignClient(value = "mise-business-2", path = "user")
public interface RemoteService {

    /**
     * 批量获取用户信息
     * @param uIds
     * @return
     */
    @GetMapping("/list/ids")
    Flux<User> listUsersByIds(@RequestParam("uIds") String uIds);

    @GetMapping("/sync/one/info")
    Mono<String> syncShowOneInfo(@RequestParam("info") String info);

    @PostMapping("/names")
    Flux<String> listNames(TestRequestVO requestVO);

}
